package com.db.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.db.pojo.SysDept;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface SysDeptDao extends BaseMapper<SysDept> {

    @Select("select a.*, b.name parentName from sys_depts a left join sys_depts b on a.parentId = b.id")
    List<Map<String, Object>> findObjects();
}
